export class user {
  id?: number;
  uid?: number;
  name = '';
  account = ''
  pwd = ''
  realName = ''
  birthday = ''
  cardId = ''
  mark = ''
  partnerId = ''
  groupId = ''
  tagId = ''
  nickname = ''
  avatar = ''
  phone = ''
  addIp = ''
  lastIp = ''
  nowMoney = ''
  brokeragePrice = ''
  integral = ''
  experience = ''
  signNum = ''
  status = ''
  level: number = 0
  spreadTime = ''
  userType = ''
  isPromoter = ''
  payCount = ''
  spreadCount = ''
  addres = ''
  adminid = ''
  loginType = ''
  createTime = ''
  updateTime = ''
  lastLoginTime = ''
  cleanTime = ''
  path = ''
  subscribe = ''
  subscribeTime = ''
  sex = ''
  country = ''
  promoterTime = ''
  image?: string
  spreadUid?: number
  userId?: number
  constructor(data?: user) {
    data && this.setProps(data);
  }

  setProps(data: user) {
    (Object.keys(this) as Array<keyof Iuser>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type Iuser = Omit<user, 'setProps'>

export class userDetail {
  "balance": "0.00"
  "integralCount": 0
  "allOrderCount": 0
  "mothOrderCount": 0
  "allConsumeCount": "0"
  "mothConsumeCount": "0"
  user = new user()
  constructor(data?: userDetail) {
    data && this.setProps(data);
  }

  setProps(data: userDetail) {
    (Object.keys(this) as Array<keyof IuserDetail>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}
export type IuserDetail = Omit<userDetail, 'setProps'>